<script type="text/javascript" src="../media/system/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../media/system/js/jQuery.vietvang.validate.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$('#adminForm').validate({
			});
		});
</script>
 <?php
     $aut=new bgAuthorize();
    // check  user login
    $group=$aut->getUserGroup();
    $u=JFactory::getUser();
    $u_ocba= $u->USEM_OCBA_CODE;
   
?>
<form action="index.php?option=com_activity" method="post" name="adminForm" id="adminForm" class="adminform" enctype="multipart/form-data">
	
    <fieldset class="" id="adminformfieldset">
    <legend>基本データ</legend>
      <input type="hidden" name="jform[ACTT_CODE]" id="jformACTT_CODE" value="<?php echo $this->row->ACTT_CODE; ?>" />
      <table class="table-information" border=0  style="width: 950px;">
        <tr>
            <td></td>
            <td class="err">※印は入力必須項目です。</td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:27%;vertical-align: top;line-height: 30px;">
                名称<span  class="err">※</span>
            </td>
            <td colspan="3">
                <input data_required="true" vvName="fullname"  type="text" name="jform[ACTT_NAME]" value="<?php echo $this->row->ACTT_NAME; ?>" class="inputbox large" style="width:92%" size="30" />
                <span name="msg_error" ></span>
            </td>
           
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:35px">同期状況</td>
            <td style="font-size: 1.091em;line-height:35px"><?php if($this->row->ACTT_DBSY == 1) echo '同期済'; else echo '未同期'; ?></td>
            
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:10%;vertical-align:top;line-height:35px">最終更新日</td>
            <td style="line-height:25px"><label style="float: left;"><?php echo HelperBG::F_GetDate_JP($this->row->ACTT_DATE) ?></label></td>
            <td></td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
                オススメ度
            </td>
            <td colspan="4">
                <select name="jform[ACTT_RECOMMENDED_DEGREE]" class="inputbox medium">
                <?php 
                        foreach(bgData::getRecommended() as $key=>$item){
                            ?>
                            <option value="<?php echo $key; ?>"<?php if ($this->row->ACTT_RECOMMENDED_DEGREE == $key) { echo ' selected="selected"';} ?>>
                            <?php echo $item; ?></option>
                            <?php 
                        }
                     ?>
                </select>
            </td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align: top;line-height:30px;">
               センター・クラブコード<span  class="err">※</span>
            </td>
            <td >
                 
                 <?php
                  if($group!=11)
                    {
                ?>
                    <input style="float: left" type="text" vvName="number" name="jform[ACTT_OCBA_CODE]" value="<?php echo $this->row->ACTT_OCBA_CODE; ?>" id="jformACTT_OCBA_CODE" class="inputbox medium" size="30" />
                    <a style="float: left; line-height: 3" href="" id="link_ocba_code" style="line-height: 28px;" >検索</a>
                 <?php }
                    else
                    {
                  ?>
                 <input readonly="true" type="text" vvName="number" name="jform[ACTT_OCBA_CODE]" value="<?php echo $this->row->ACTT_OCBA_CODE; ?>" id="jformACTT_OCBA_CODE" class="inputbox medium" size="30" />
                 <?php } ?>
                 <span name="msg_error"></span>
            </td>
            <td colspan="3"></td>
        </tr>
        
         <tr style="vertical-align: top;line-height: 30px;">
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
                期間
            </td>
            <td class="td_left" style="width:22%">
                <?php if($this->row->ACTT_PERIOD_START != 0){ $dt = date('Y-m-d',strtotime($this->row->ACTT_PERIOD_START));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[ACTT_PERIOD_START]', 'jformACTT_PERIOD_START');?>
                <span name="msg_error"></span>
            </td>
            <td style="width: 4%;text-align:center;vertical-align: top;line-height: 30px;">～</td>
            <td style="width: 20%;">
                <?php if($this->row->ACTT_PERIOD_FINISH != 0){ $dt = date('Y-m-d',strtotime($this->row->ACTT_PERIOD_FINISH));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[ACTT_PERIOD_FINISH]', 'jformACTT_PERIOD_FINISH');?>
                <span name="msg_error"></span>
            </td>
            <td></td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
                募集ステータス
            </td>
            <td colspan="4">
                <select name="jform[ACTT_RECR]" class="inputbox medium">
                    <?php if($this->row->ACTT_RECR == 1){
                        echo "<option value='1' selected>募集開始前</option>
                            <option value='2'>募集中</option>
                            <option value='3'>募集終了</option> ";
                    }elseif($this->row->ACTT_RECR == 2){
                        echo "<option value='1'>募集開始前</option>
                            <option value='2' selected>募集中</option>
                            <option value='3'>募集終了</option> ";
                    }else{
                        echo "<option value='1'>募集開始前</option>
                            <option value='2'>募集中</option>
                            <option value='3' selected >募集終了</option> ";
                    } ?>                     
                </select>
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
               会場
            </td>
            <td colspan="4">
                <input type="text" name="jform[ACTT_VENUE]" value="<?php echo $this->row->ACTT_VENUE; ?>" class="inputbox medium" size="30" />
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
               主催
            </td>
            <td colspan="4">
                 <input type="text" name="jform[ACTT_TOCHUC]" value="<?php echo $this->row->ACTT_TOCHUC; ?>" class="inputbox medium" size="30"/>
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
              後援
            </td>
            <td colspan="4">
                <input type="text" name="jform[ACTT_TAITRO]" value="<?php echo $this->row->ACTT_TAITRO; ?>" class="inputbox medium" size="30" />
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
               協力
            </td>
            <td colspan="4">
                 <input type="text" name="jform[ACTT_COOPERATION]" value="<?php echo $this->row->ACTT_COOPERATION; ?>" class="inputbox medium" size="30"/>
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
              問合せ先
            </td>
            <td colspan="4">
                 <input type="text" name="jform[ACTT_CONTACT]" value="<?php echo $this->row->ACTT_CONTACT; ?>" class="inputbox medium"/>
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
                問合わせ先 担当者名
            </td>
            <td colspan="4">
                 <input type="text" name="jform[ACTT_PERSON]" value="<?php echo $this->row->ACTT_PERSON; ?>" class="inputbox medium" />
            </td>
         </tr>
         <tr style="vertical-align: top;line-height: 30px;">
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
                問合わせ先 電話番号
            </td>
            <td>
                 <input type="text" vvName="phone" name="jform[ACTT_TEL]" value="<?php echo $this->row->ACTT_TEL; ?>" class="inputbox medium" />
                <span name="msg_error"></span>
            </td>
         </tr>
         <tr>
      </table>
    </fieldset>
    <fieldset class="" id="adminformfieldset">
        <legend>基本概要</legend>
      <table class="table-information">
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:20%;vertical-align:middle">
               趣旨
            </td>
            <td colspan="4">
                <textarea name="jform[ACTT_EFFECT]" cols="62" rows="4" style="width: 80%;"><?php echo $this->row->ACTT_EFFECT; ?></textarea>
            </td>
         </tr>
         <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
             対象
            </td>
            <td>
                 <input type="text" value="<?php echo $this->row->ACTT_TARGET; ?>" name="jform[ACTT_TARGET]" class="inputbox medium" size="30" />
            </td>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height: 30px;">
                性別
            </td>
            <td class="text-align-left">
                <select name="jform[ACTT_SEX]" class="inputbox medium">
                    <option value="1" <?php if($this->row->ACTT_SEX == 1){ echo 'selected="selected"'; } ?> >男性</option>
                    <option value="2" <?php if($this->row->ACTT_SEX == 2){ echo 'selected="selected"'; } ?> >女性</option>  
                    <option value="0" <?php if($this->row->ACTT_SEX == 0){ echo 'selected="selected"'; } ?> >全て</option>                   
                </select>
            </td>
         </tr>
          <tr style="vertical-align: top;line-height: 30px;">
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;width: 200px;">
                参加人数
            </td>
            <td>
                <input type="text" vvName="number"  name="jform[ACTT_NUMBER_OF_PARTICIPANTS]" value="<?php echo $this->row->ACTT_NUMBER_OF_PARTICIPANTS; ?>" class="inputbox medium" size="30" /><span style="font-size:1.091em ;line-height: 30px;">人</span>
                <span name="msg_error"></span>
            </td>
         </tr>
          <tr style="vertical-align: top;line-height: 30px;">
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
               参加費
            </td>
            <td style="width: 200px;">
                <input type="text" vvName="number" name="jform[ACTT_ENTRY_FEE]" value="<?php echo $this->row->ACTT_ENTRY_FEE; ?>" class="inputbox medium" size="30" /><span style="font-size:1.091em ;line-height: 30px;">円</span>
                <span name="msg_error"></span> 
            </td>
         </tr>
         <tr style="vertical-align: top;line-height: 30px;">
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">
                総事業費
            </td>
            <td>
                <input type="text" vvName="number" name="jform[ACTT_TOTAL_PROJECT_COST]" value="<?php echo $this->row->ACTT_TOTAL_PROJECT_COST; ?>" class="inputbox medium" size="30" /><span style="font-size:1.091em ;line-height: 30px;">円</span>
                <span name="msg_error"></span> 
            </td>
         </tr>
          <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align:middle">
               事業内容
            </td>
            <td colspan="4">
                
                 <textarea rows="4" name="jform[ACTT_BUSINESS]" cols="62" rows="4" style="width: 80%;" ><?php echo $this->row->ACTT_BUSINESS; ?></textarea>
            </td>
         </tr>
          <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align:middle">
               備考
            </td>
            <td colspan="4">
                <textarea rows="4" name="jform[ACTT_REMARKS]" cols="62" rows="4" style="width: 80%;" ><?php echo $this->row->ACTT_REMARKS; ?></textarea>
            </td>
         </tr>
        </table>
    </fieldset>
    <fieldset class="" id="adminformfieldset">
        <legend>ジャンル</legend>
    
      <table id="list-check" class="table-information" style="width: 100%;" >
        <?php
            $count_mfac = count($this->list_mfac);
            $count_all = $count_mfac;
            $i = 0;
            while($count_mfac > 0){
        ?>
        <tr >
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;"><?php if($count_mfac == $count_all){ ?>施設<?php } ?></td>
                        
            <?php
                
                if($this->list_mfac != null){
                    
                    if(!empty($this->row->ACTT_MFAC_CODE_LIST)){ $list_mfac_check = explode(",",$this->row->ACTT_MFAC_CODE_LIST); }
                    
                    for($item1=$i;$item1 < count($this->list_mfac); $item1++){
                        $i++;
                        $count_mfac--;
                        
            ?>
            
            <td style="width: 20%;"><input style="float: left;text-align:left;" type="checkbox" name="jform[MFAC<?php echo $this->list_mfac[$item1]->MFAC_CODE; ?>]" id="MFAC<?php echo $this->list_mfac[$item1]->MFAC_CODE; ?>" value="<?php echo $this->list_mfac[$item1]->MFAC_CODE; ?>"  <?php if(isset($list_mfac_check)){ foreach($list_mfac_check as $val){ if($this->list_mfac[$item1]->MFAC_CODE == $val){ echo 'checked="checked"'; }} } ?> /><label style="line-height: 30px !important;margin-left: 20px;float:left; margin-top:-28px;" for="MFAC<?php echo $this->list_mfac[$item1]->MFAC_CODE; ?>" style="line-height: 4px !important;margin-left: 5px;" ><?php echo $this->list_mfac[$item1]->MFAC_NAME; ?></label></td>
            <?php
                         if($i==4){
                            break;
                         }
                    }
                }
            ?>
            
            
        </tr>
        <?php } ?>
        
        <?php
            $count_mobj = count($this->list_mobj);
            $count_all = $count_mobj;
            $i = 0;
            while($count_mobj > 0){
        ?>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;"><?php if($count_mobj == $count_all){ ?>対象<?php } ?></td>
            <?php
                
                if($this->list_mobj != null){
                    
                    if(!empty($this->row->ACTT_MOBJ_CODE_LIST)){ $list_mobj_check = explode(",",$this->row->ACTT_MOBJ_CODE_LIST); }
                    
                    for($item1=$i;$item1 < count($this->list_mobj); $item1++){
                        $i++;
                        $count_mobj--;
            ?>
            <td style="width: 20%;"><input style="float: left;text-align:left;" type="checkbox" name="jform[MOBJ<?php echo $this->list_mobj[$item1]->MOBJ_CODE; ?>]" id="MOBJ<?php echo $this->list_mobj[$item1]->MOBJ_CODE; ?>" value="<?php echo $this->list_mobj[$item1]->MOBJ_CODE; ?>"  <?php if(isset($list_mobj_check)){ foreach($list_mobj_check as $val){ if($this->list_mobj[$item1]->MOBJ_CODE == $val){ echo 'checked="checked"'; }} } ?> /><label style="line-height: 30px !important;margin-left: 20px;float:left; margin-top:-28px;" for="MOBJ<?php echo $this->list_mobj[$item1]->MOBJ_CODE; ?>" style="line-height: 4px !important;margin-left: 5px;" ><?php echo $this->list_mobj[$item1]->MOBJ_NAME; ?></label></td>
            
            <?php
                         if($i==4){
                            break;
                         }
                    }
                }
            ?>
            
            
        </tr>
        <?php } ?>
        
        
        <?php
            $count_mcon = count($this->list_mcon);
            $count_all = $count_mcon;
            $i = 0;
            while($count_mcon > 0){
        ?>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;"><?php if($count_mcon == $count_all){ ?>内容<?php } ?></td>
            <?php
                
                if($this->list_mcon != null){
                    
                    if(!empty($this->row->ACTT_MCON_CODE_LIST)){ $list_mcon_check = explode(",",$this->row->ACTT_MCON_CODE_LIST); }
                    
                    for($item2=$i;$item2 < count($this->list_mcon); $item2++){
                        $i++;
                        $count_mcon--;
            ?>
            <td style="width: 20%;"><input style="float: left;text-align:left;" type="checkbox" name="jform[MCON<?php echo $this->list_mcon[$item2]->MCON_CODE; ?>]" id="MCON<?php echo $this->list_mcon[$item2]->MCON_CODE; ?>" value="<?php echo $this->list_mcon[$item2]->MCON_CODE; ?>"  <?php if(isset($list_mcon_check)){ foreach($list_mcon_check as $val){ if($this->list_mcon[$item2]->MCON_CODE == $val){ echo 'checked="checked"'; }} } ?> /><label style="line-height: 30px !important;margin-left: 20px;float:left; margin-top:-28px;" for="MCON<?php echo $this->list_mcon[$item2]->MCON_CODE; ?>" style="line-height: 4px !important;margin-left: 5px;" ><?php echo $this->list_mcon[$item2]->MCON_NAME; ?></label></td>
            
            <?php
                         if($i==4){
                            break;
                         }
                    }
                }
            ?>
            
            
        </tr>
        <?php } ?>
        
      </table>
     </fieldset> 
      
    <fieldset class="" id="adminformfieldset">
    <legend>画面データ</legend>
     <table class="table-information" border=0>
        <tr>
            <td></td>
            <td colspan="2" class="waiting">(推奨される画像の縦横比は「3:4」です。)</td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:22%;">画面ファイル1</td>
            <td style="width:10%;">
              <!-- <input type="file" name="jformACTT_IMAGE_1" value="" /> -->
              <?php HelperBG::getLibUploadify(); ?>
              <?php HelperBG::getUpload('jformACTT_IMAGE_1', $this->row->ACTT_IMAGE_1, 'uploads/images/com_activity'); ?>
              <a href="download.php?folder=images/com_activity&file=<?php echo $this->row->ACTT_IMAGE_1; ?>" class="lb_upload"><?php echo $this->row->ACTT_IMAGE_1; ?></a>
            </td>
            <td style="width:60%;">
                <input type="text" name="jform[ACTT_DECR_IMG_1]" value="<?php echo $this->row->ACTT_DECR_IMG_1; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_IMAGE_1_OLD]" value="<?php echo $this->row->ACTT_IMAGE_1; ?>" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td colspan="2" class="waiting">(推奨される画像の縦横比は「3:4」です。)</td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">画面ファイル2</td>
            <td>
              <!-- <input type="file" name="jformACTT_IMAGE_2" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_IMAGE_2', $this->row->ACTT_IMAGE_2, 'uploads/images/com_activity'); ?>
              <a href="download.php?folder=images/com_activity&file=<?php echo $this->row->ACTT_IMAGE_2; ?>" class="lb_upload"><?php echo $this->row->ACTT_IMAGE_2; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_IMG_2]" value="<?php echo $this->row->ACTT_DECR_IMG_2; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_IMAGE_2_OLD]" value="<?php echo $this->row->ACTT_IMAGE_2; ?>" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td colspan="2" class="waiting">(推奨される画像の縦横比は「3:4」です。)</td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">画面ファイル3</td>
            <td>
              <!-- <input type="file" name="jformACTT_IMAGE_3" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_IMAGE_3', $this->row->ACTT_IMAGE_3, 'uploads/images/com_activity'); ?>
              <a href="download.php?folder=images/com_activity&file=<?php echo $this->row->ACTT_IMAGE_3; ?>" class="lb_upload"><?php echo $this->row->ACTT_IMAGE_3; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_IMG_3]" value="<?php echo $this->row->ACTT_DECR_IMG_3; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_IMAGE_3_OLD]" value="<?php echo $this->row->ACTT_IMAGE_3; ?>" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td colspan="2" class="waiting">(推奨される画像の縦横比は「3:4」です。)</td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">画面ファイル4</td>
            <td>
              <!-- <input type="file" name="jformACTT_IMAGE_4" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_IMAGE_4', $this->row->ACTT_IMAGE_4, 'uploads/images/com_activity'); ?>
              <a href="download.php?folder=images/com_activity&file=<?php echo $this->row->ACTT_IMAGE_4; ?>" class="lb_upload"><?php echo $this->row->ACTT_IMAGE_4; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_IMG_4]" value="<?php echo $this->row->ACTT_DECR_IMG_4; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_IMAGE_4_OLD]" value="<?php echo $this->row->ACTT_IMAGE_4; ?>" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td colspan="2" class="waiting">(推奨される画像の縦横比は「3:4」です。)</td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">画面ファイル5</td>
            <td>
              <!-- <input type="file" name="jformACTT_IMAGE_5" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_IMAGE_5', $this->row->ACTT_IMAGE_5, 'uploads/images/com_activity'); ?>
              <a href="download.php?folder=images/com_activity&file=<?php echo $this->row->ACTT_IMAGE_5; ?>" class="lb_upload"><?php echo $this->row->ACTT_IMAGE_5; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_IMG_5]" value="<?php echo $this->row->ACTT_DECR_IMG_5; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_IMAGE_5_OLD]" value="<?php echo $this->row->ACTT_IMAGE_5; ?>" />
            </td>
        </tr>
        
       </table>
    </fieldset>
       
       
    <fieldset class="" id="adminformfieldset">
        <legend>添付ファイル</legend>
        <table class="table-information" border=0>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:22%;">添付ファイル1</td>
            <td style="width:10%;">
              <!-- <input type="file" name="jformACTT_ATTACHMENT_1" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_ATTACHMENT_1', $this->row->ACTT_ATTACHMENT_1, 'uploads/files/com_activity/'); ?>
              <a href="download.php?folder=files/com_activity&file=<?php echo $this->row->ACTT_ATTACHMENT_1; ?>" class="lb_upload"><?php echo $this->row->ACTT_ATTACHMENT_1; ?></a>
            </td>
            <td style="width:60%;">
                <input type="text" name="jform[ACTT_DECR_ATT_1]" value="<?php echo $this->row->ACTT_DECR_ATT_1; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_ATTACHMENT_1_OLD]" value="<?php echo $this->row->ACTT_ATTACHMENT_1; ?>" />
            </td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">添付ファイル2</td>
            <td>
              <!-- <input type="file" name="jformACTT_ATTACHMENT_2" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_ATTACHMENT_2', $this->row->ACTT_ATTACHMENT_2, 'uploads/files/com_activity/'); ?>
              <a href="download.php?folder=files/com_activity&file=<?php echo $this->row->ACTT_ATTACHMENT_2; ?>" class="lb_upload"><?php echo $this->row->ACTT_ATTACHMENT_2; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_ATT_2]" value="<?php echo $this->row->ACTT_DECR_ATT_2; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_ATTACHMENT_2_OLD]" value="<?php echo $this->row->ACTT_ATTACHMENT_2; ?>" />
            </td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">添付ファイル3</td>
            <td>
              <!-- <input type="file" name="jformACTT_ATTACHMENT_3" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_ATTACHMENT_3', $this->row->ACTT_ATTACHMENT_3, 'uploads/files/com_activity/'); ?>
              <a href="download.php?folder=files/com_activity&file=<?php echo $this->row->ACTT_ATTACHMENT_3; ?>" class="lb_upload"><?php echo $this->row->ACTT_ATTACHMENT_3; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_ATT_3]" value="<?php echo $this->row->ACTT_DECR_ATT_3; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_ATTACHMENT_3_OLD]" value="<?php echo $this->row->ACTT_ATTACHMENT_3; ?>" />
            </td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">添付ファイル4</td>
            <td>
              <!-- <input type="file" name="jformACTT_ATTACHMENT_4" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_ATTACHMENT_4', $this->row->ACTT_ATTACHMENT_4, 'uploads/files/com_activity/'); ?>
              <a href="download.php?folder=files/com_activity&file=<?php echo $this->row->ACTT_ATTACHMENT_4; ?>" class="lb_upload"><?php echo $this->row->ACTT_ATTACHMENT_4; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_ATT_4]" value="<?php echo $this->row->ACTT_DECR_ATT_4; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_ATTACHMENT_4_OLD]" value="<?php echo $this->row->ACTT_ATTACHMENT_4; ?>" />
            </td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">添付ファイル5</td>
            <td>
              <!-- <input type="file" name="jformACTT_ATTACHMENT_5" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_ATTACHMENT_5', $this->row->ACTT_ATTACHMENT_5, 'uploads/files/com_activity/'); ?>
              <a href="download.php?folder=files/com_activity&file=<?php echo $this->row->ACTT_ATTACHMENT_5; ?>" class="lb_upload"><?php echo $this->row->ACTT_ATTACHMENT_5; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_ATT_5]" value="<?php echo $this->row->ACTT_DECR_ATT_5; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_ATTACHMENT_5_OLD]" value="<?php echo $this->row->ACTT_ATTACHMENT_5; ?>" />
            </td>
        </tr>
        <tr>
            <td style="text-align: right;font-size: 1.091em;padding-right:5px;">添付ファイル6</td>
            <td>
              <!-- <input type="file" name="jformACTT_ATTACHMENT_6" value="" /> -->
              <?php HelperBG::getUpload('jformACTT_ATTACHMENT_6', $this->row->ACTT_ATTACHMENT_6, 'uploads/files/com_activity/'); ?>
              <a href="download.php?folder=files/com_activity&file=<?php echo $this->row->ACTT_ATTACHMENT_6; ?>" class="lb_upload"><?php echo $this->row->ACTT_ATTACHMENT_6; ?></a>
            </td>
            <td>
                <input type="text" name="jform[ACTT_DECR_ATT_6]" value="<?php echo $this->row->ACTT_DECR_ATT_6; ?>" class="inputbox medium big" />
                <input type="hidden" name="jform[ACTT_ATTACHMENT_6_OLD]" value="<?php echo $this->row->ACTT_ATTACHMENT_6; ?>" />
            </td>
        </tr>
        
       </table>
     </fieldset>
	   <input type="hidden" name="task" value="" />
       <input type="hidden" name="action" value="edit" />
	
</form>

<script>

    /*show a dialog box: center search */
    jq('#link_ocba_code').bind('click', function(e){
        e.preventDefault();
            zb = new jq.Zebra_Dialog('', {
                source:  {'ajax': 'index.php?option=com_activity&views=bg&task=popup_ocba&tmpl=component'},
                height: 800,
                width: 550,
                title:  'センター・クラブ検索',
                type:  '',
                buttons:  [
                    {caption: '閉じる', callback: function() { }}
                        
                ]
            });
    });
    /*select center id */
    jq(".link_ocba_code").live("click",function(){
        //var id = jq(this).html();
        var id = jq("#ocba_code_temp").val();
        jq("#jformACTT_OCBA_CODE").val(id);
        zb.close();
    });
            
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformACTT_PERIOD_START",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformACTT_PERIOD_START",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformACTT_PERIOD_FINISH",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformACTT_PERIOD_FINISH",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    });

    jq('#lb_upload_jformACTT_IMAGE_1').css('display','none');
    jq('#lb_upload_jformACTT_IMAGE_2').css('display','none');
    jq('#lb_upload_jformACTT_IMAGE_3').css('display','none');
    jq('#lb_upload_jformACTT_IMAGE_4').css('display','none');
    jq('#lb_upload_jformACTT_IMAGE_5').css('display','none');

    jq('#lb_upload_jformACTT_ATTACHMENT_1').css('display','none');
    jq('#lb_upload_jformACTT_ATTACHMENT_2').css('display','none');
    jq('#lb_upload_jformACTT_ATTACHMENT_3').css('display','none');
    jq('#lb_upload_jformACTT_ATTACHMENT_4').css('display','none');
    jq('#lb_upload_jformACTT_ATTACHMENT_5').css('display','none');
    jq('#lb_upload_jformACTT_ATTACHMENT_6').css('display','none');
</script>